package cn.jbt.config;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class XxlJobConfig {

    /**
     * <h2>是否开启注册任务执行器</h2>
     */
    @NotNull(message = "enable NotNull")
    private Integer enable;

    /**
     * <h2>调度中心登陆账号</h2>
     */
    @NotBlank(message = "username NotBlank")
    private String username;

    /**
     * <h2>调度中心登陆密码</h2>
     */
    @NotBlank(message = "password NotBlank")
    private String password;

    /**
     * <h2>调度中心地址</h2>
     */
    @NotBlank(message = "adminAddresses NotBlank")
    private String adminAddresses;

    /**
     * <h2>认证token</h2>
     */
    @NotBlank(message = "accessToken NotBlank")
    private String accessToken;

    /**
     * <h2>执行器名称</h2>
     */
    @NotBlank(message = "appname NotBlank")
    private String appname;

    /**
     * <h2>执行器地址（真实IP）</h2>
     */
    @NotBlank(message = "address NotBlank")
    private String address;

    /**
     * <h2>执行器IP（真实IP）</h2>
     */
    @NotBlank(message = "ip NotBlank")
    private String ip;

    /**
     * <h2>执行器端口</h2>
     */
    @NotNull(message = "port NotNull")
    private Integer port;

    /**
     * <h2>日志路径</h2>
     */
    @NotBlank(message = "logPath NotBlank")
    private String logPath;

    /**
     * <h2>日志保留天数</h2>
     */
    @NotNull(message = "logRetentionDays NotNull")
    private Integer logRetentionDays;

}
